<script src="../../admin/inc/js/jquery-chekform.js"
	type="text/javascript"></script>
<script language="javascript">
$(function(){
	$("#header-city").click(function(){
		if($("#showcity").css("display")=='none'){
			$("#showcity").show();
		}else{
			$("#showcity").hide();
		}
	
	});
	
		$("#subinfo").click(function(){	
		var subemail=$("#subemail").val();
		
	if($("#subemail").chk(rule["mail"])==false){
		if($("#subemail").chk(rule["mobile"])==false){
			$("#submsg").html("您输入的既不是邮箱也不是手机");
			}else{
				 //alert(subemail);
				$.ajax({       
					//   type: "POST",
					 url: "ajax/do.php",
					 data: "action=submsginfo&subcity=<?php echo $_GET['city']; ?>&subemail="+subemail,
					 success: function(msg){


					//	 alert(msg);
					
						 if(msg=="mobile_has"){

				        	$("#submsg").html("您的手机已经订阅了该地区的团购信息");
				        	 
				              }
				         if(msg=="mobile_add"){
				        	 //alert("恭喜您，订阅成功");

				        	 $("#submsg").html("恭喜您，订阅成功");
				             }
				         if(msg=="mobile_unadd"){
				        	 //alert("订阅失败，稍后再试");
				        	 $("#submsg").html("订阅失败，稍后再试");
				             }
			             //*/
						//alert(msg);
					     }
					  });
				//alert("手机订阅尚未启用");
			}
		
		}else{
	$.ajax({       
	//   type: "POST",
	 url: "ajax/do.php",
	 data: "action=subinfo&subcity=<?php echo $_GET['city']; ?>&subemail="+subemail,
	 success: function(msg){
         if(msg=="mail_has"){
        	// alert("您的邮件已经订阅了该市的团购信息");

        	$("#submsg").html("您的邮件已经订阅了该地区的团购信息");
        	 
              }
         if(msg=="mail_add"){
        	 //alert("恭喜您，订阅成功");

        	 $("#submsg").html("恭喜您，订阅成功");
             }
         if(msg=="mail_unadd"){
        	 //alert("订阅失败，稍后再试");
        	 $("#submsg").html("订阅失败，稍后再试");
             }
		//alert(msg);
	     }
	  });
	}//是邮箱时的ajax操作

	
	
		});
	
	})
</script>

<div id="logo">
<img src=".../../../../admin/do/ajax/<?php echo $this->_var['siteinfo']['logo']; ?>" /></div>
<div class="guides">
<div class="city">
<h2 id="header-city" class="fold"><span><?php echo $this->_var['city']; ?></span><em></em></h2>
</div>
</div>
<div
	style="background-color: #666666; padding: 5px; display: none; width: 400px; margin-left: 200px"
	id="showcity"><!--  -->

<UL style="font-size: 18px;">
<!-- <?php if ($this->_var['topcitylist']): ?> -->
<!-- <?php $_from = $this->_var['topcitylist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'item');$this->_foreach['topcitylist'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['topcitylist']['total'] > 0):
    foreach ($_from AS $this->_var['item']):
        $this->_foreach['topcitylist']['iteration']++;
?> -->
	<li style="float: left; margin: 8px"><!-- <?php if ($this->_var['item']['is_close'] != 'N'): ?> --><?php echo $this->_var['item']['name']; ?><!-- <?php else: ?> --><a href="index.php?city=<?php echo $this->_var['item']['id']; ?>" style="color: #FFFFFF; border: #FFFFFF solid 1px; padding: 3px"><?php echo $this->_var['item']['name']; ?></a><!-- <?php endif; ?> --></li>

	<!-- <li style="float: left; margin-left: 10px"><a href="index.php?city=2">淮安</a></li>
 -->
 <!-- <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?> -->
<!-- <?php endif; ?> -->

</UL>

<!--  --></div>

<div id="header-subscribe-body" class="subscribe"><!-- <form action="do.php?action=subscribe" method="post" id="header-subscribe-form">
 --> <label for="header-subscribe-email" class="text">想知道<?php echo $this->_var['city']; ?>明天的团购是什么吗？</label>
<input type="text" value="输入Email或手机号码" class="f-text" name="email"
	id="subemail" /> <input type="button" class="commit" value="订阅"
	id="subinfo" /> <!-- 
	<span id="header-subscribe-sms" class="sms">&raquo;
短信订阅，免费！</span> 
 --> <span class="sms" id="submsg">订阅我们的服务,请直接输入手机或邮箱！</span> <!-- </form> --></div>
<div id="header-subscribe-auto" class="email-auto"></div>

<ul class="nav cf">
	<li><a href="index.php<?php echo $this->_var['cityurl']; ?>" class="today">今日团购</a></li>
	<li><a href="list.php">往期团购</a></li>
	
	<li><a href="about.php?action=how">玩转团购</a></li>
	<!-- 
	<li><a href="help/faq.htm">常见问题</a></li>
	 -->
</ul>
<div class="logins">
<ul class="links">
	<!-- <?php if ($this->_var['siteinfo']['username'] == ''): ?> -->
	<li class="login"><a href="do.php">登录</a></li>
	<li class="signup"><a href="do.php?action=singup">注册</a></li>
	<!-- <?php else: ?> -->
	<li class="login"><a href="do.php?action=coupons"><?php echo $this->_var['siteinfo']['username']; ?></a></li>
	<li class="signup"><a href="do.php?action=loginout">注销</a></li>
	<!-- <?php endif; ?> -->




</ul>
<div class="line "></div>
<!-- 
<div class="refer"><a href="account/referrals.htm">邀请好友购买返 10
元</a></div>
 --></div>
